package com.zhongxia.feign;

import com.zhongxia.entity.User;
import com.zhongxia.entity.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: 废柴弟弟
 * @Date: 2020/4/1 11:47
 */
@FeignClient(value="user")
public interface UserFeign {

    @GetMapping("/user/findAll/{index}/{limit}")
    public UserVO findAll(@PathVariable("index") int index, @PathVariable("limit") int limit);

    @PostMapping("/user/save")
    public void save(@RequestBody User user);

    @DeleteMapping("/user/deleteById/{id}")
    public void deleteById(@PathVariable("id") int id);
    @GetMapping("/user/count")
    public int count();
}
